import {Card, Row, Col, List, Typography, Table, Tag} from "antd";
import Base from "@/pages/Province/SubjectsOverview/components/Base";
import {FileWordOutlined} from "@ant-design/icons";
import {nanoid} from "@ant-design/pro-components";
import Pie from '@/pages/Province/SubjectDetail/components/Pie'
import Table_01 from "./components/Table_01";
import Emm01_1 from './components/Emm01_1'
import React, {useEffect, useState} from "react";
import {
  OverView03Contest,
  OverView03Foreign,
  OverView03Leader,
  OverView03LeaderNum,
  OverView03Response, OverView04Hold, OverView04Research, OverView04Top
} from "@/services/Province/Dashboard";

export default (props) => {

  const [topData, setTopdata] = useState([])
  const [researchData, setResearchData] = useState([])
  const [holdData, setHoldData] = useState([])
  const [reload, setReload] = useState(false)

  useEffect(() => {
    OverView04Top().then(res => {
      if (res.status === 0) {
        setTopdata(res.data)
      }
    })
    OverView04Research().then(res => {
      if (res.status === 0) {
        setResearchData(res.data)
      }
    })
    OverView04Hold().then(res => {
      if (res.status === 0) {
        setHoldData(res.data)
      }
    })
  }, [reload])

  return <Base props={props}>
    <Row gutter={[24, 24]}>
      {/*<Col span={24}><Card title="专任教师队伍">*/}
      {/*  <List*/}
      {/*    grid={{gutter: 16, column: 4}}*/}
      {/*    dataSource={teacherGroupData}*/}
      {/*    renderItem={item => (*/}
      {/*      <List.Item>*/}
      {/*        <Card title={item.title}>*/}
      {/*          <span style={{fontSize: 16}}>人数：<Typography.Text strong>{item.number}</Typography.Text>人</span>*/}
      {/*        </Card>*/}
      {/*      </List.Item>*/}
      {/*    )}*/}
      {/*  />*/}
      {/*</Card></Col>*/}
      <Col span={24}>
        <Card title="教师在国内外发表顶级期刊数量">
          <Row gutter={[24, 24]}>
            <Col span={10}>
              <Table_01 data={topData} title="教师在国内外发表顶级期刊数量" />
            </Col>
            <Col span={14}>
              <Emm01_1 data={topData} title="教师在国内外发表顶级期刊数量" />
            </Col>
          </Row>
        </Card>
      </Col>
      <Col span={24}>
        <Card title="国家级科研平台数量">
          <Row gutter={[24, 24]}>
            <Col span={10}>
              <Table_01 data={researchData} title="国家级科研平台数量" />
            </Col>
            <Col span={14}>
              <Emm01_1 data={researchData} title="国家级科研平台数量" />
            </Col>
          </Row>
        </Card>
      </Col>
      <Col span={24}>
        <Card title="学科主持国家重点重大项目数量">
          <Row gutter={[24, 24]}>
            <Col span={10}>
              <Table_01 data={holdData} title="学科主持国家重点重大项目数量" />
            </Col>
            <Col span={14}>
              <Emm01_1 data={holdData} title="学科主持国家重点重大项目数量" />
            </Col>
          </Row>
        </Card>
      </Col>
      {/*<Col span={24}>*/}
      {/*  <Card title="师资队伍国际水平">*/}
      {/*    <Row gutter={24} justify="space-around" align="middle">*/}
      {/*      <Col span={12}>*/}
      {/*        <List*/}
      {/*          header={<Typography.Text strong>师资队伍国际水平人数情况</Typography.Text>}*/}
      {/*          bordered*/}
      {/*          dataSource={foreignLevelData}*/}
      {/*          renderItem={item => (*/}
      {/*            <List.Item>*/}
      {/*              <Typography.Text strong>{item.name}</Typography.Text>: <Tag color="blue">{item.value}人</Tag>*/}
      {/*            </List.Item>*/}
      {/*          )}*/}
      {/*        />*/}
      {/*      </Col>*/}
      {/*      <Col span={12}>*/}
      {/*        <Pie name="师资队伍国际水平人数占比情况"*/}
      {/*             data={foreignLevelData}*/}
      {/*             height="300px"*/}
      {/*        />*/}
      {/*      </Col>*/}
      {/*    </Row>*/}
      {/*  </Card>*/}
      {/*</Col>*/}
    </Row>
  </Base>
}
